import service from '@/utils/baseApi.js'
export function shopPurOrderList(data) {
	return service({
		url: '/framework/shopPurOrder/list',
		method: 'Get',
		data
	})
}

export function shopPurOrderAdd(data) {
	return service({
		url: data.shopPurOrderList.length>1?'/framework/shopPurOrder/combineInsertByBoFromB':'/framework/shopPurOrder',
		method: 'post',
		data
	})
}
export function combineInsertByBoFromB(data) {
	return service({
		url: '/framework/shopPurOrder/combineInsertByBoFromB',
		method: 'post',
		data
	})
}

export function shopPurOrderInfo(shopPurOrderId,orderPayType) {
	return service({
		url: `/framework/shopPurOrder/com/${orderPayType}/${shopPurOrderId}`,
		method: 'Get'
	})
}

export function shopPurOrderAudit(data) {
	return service({
		url: `/framework/shopPurOrder/audit`,
		method: 'put',
		data
	})
}
// 

export function getInfoOther(data) {
	return service({
		url: `/framework/strategyPresale/getInfoOther`,
		method: 'get',
		data
	})
}
export function infoByAreaId(data) {
	return service({
		url: `/framework/bSendRange/infoTemp`,
		method: 'get',
		data
	})
}
export function getSendMoney(data) {
	return service({
		url: `/framework/shopPurOrder/getSendMoney`,
		method: 'post',
		data
	})
}


export function submitShopPurOrder(data) {
	return service({
		url: `/framework/shopPurOrder/submitShopPurOrder`,
		method: 'post',
		data
	})
}

// 删除订单
export function shopPurOrderDel(shopPurOrderId) {
	return service({
		url: `/framework/shopPurOrder/${shopPurOrderId}`,
		method: 'delete'
	})
}
export function directGWGetQRCode(data) {
	return service({
		url: `/framework/shopPurOrder/directGWGetQRCode`,
		method: 'get',
		data
	})
}
export function directGWGetQRCodeMap(data) {
	return service({
		url: data.isLess?'/framework/shopPurOrderChangeLog/directGWGetQRCodeMap': `/framework/shopPurOrder/directGWGetQRCodeMap`,
		method: 'get',
		data
	})
}
export function szBankApplet(data) {
	return service({
		url: `/framework/shopPurOrder/szBankApplet`,
		method: 'get',
		data
	})

}
export function szBankAppletLess(data) {
	return service({
		url: `/framework/shopPurOrderChangeLog/szBankApplet`,
		method: 'get',
		data
	})
}

// 预下单
export function insertBPrePurOrder(data) {
	return service({
		url: '/framework/shopPurOrder/insertBPrePurOrder',
		method: 'post',
		data
	})
}

export function shopPurOrderChangeLogList(data) {
	return service({
		url: `/framework/shopPurOrderChangeLog/list`,
		method: 'get',
		data
	})
}

export function shopPurOrderChangeLogInfo(shopPurOrderChangeLogId) {
	return service({
		url: `/framework/shopPurOrderChangeLog/${shopPurOrderChangeLogId}`,
		method: 'Get'
	})
}
export function refundAdd(data) {
	return service({
		url: `/framework/shopPurOrderChangeLog/refund`,
		method: 'post',
		data
	})
}
export function getSendTime(data) {
	return service({
		url: `/framework/sendTime/getSendTimeMap`,
		method: 'get',
		data
	})
}
